package com.source.hotelbath.net.request;

import android.content.Context;

import com.ffcs.network.connect.ResponseListener;
import com.source.hotelbath.model.OrderGoodsList;
import com.source.hotelbath.net.CustomerRequest;
import com.source.hotelbath.net.response.OrderSubmitResponse;

import java.io.File;

/**
 * Created by ZhouMeng on 2017/9/28.
 */

public class OrderSubmitRequest extends CustomerRequest<OrderSubmitResponse> {
    public static final int TAG = ORDER_SUBMIT_TAG;
    private String order;
    private String remark;
    private int hotelId;
    private String hotelName;
    private OrderGoodsList goodsList;
    private String path;
  private  File file;
    public void setGoodsList(OrderGoodsList goodsList) {
        this.goodsList = goodsList;
    }

    public OrderSubmitRequest(Context context, ResponseListener listener, String url, boolean isPost) {
        super(context, TAG, listener, url, isPost);
    }

    public void setOrder(String order) {
        this.order = order;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public void setHotelId(int hotelId) {
        this.hotelId = hotelId;
    }

    public void setHotelName(String hotelName) {
        this.hotelName = hotelName;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public void setFile(File file) {
        this.file = file;
    }

    @Override
    public void sendRequest() {
        mReqWrapper.addParam("order",order);
        mReqWrapper.addFile("sign","1506606752607.png",new File("/storage/emulated/0/Android/data/com.source.armedpolice/cache/img/upload/temp/8f4cb4f2244fa1a7e8d3b9ed6f089362"));

//        mReqWrapper.addParam("remark",remark);
//        mReqWrapper.addParam("hotelId",hotelId);
//        mReqWrapper.addParam("order",goodsList);
//        mReqWrapper.addParam("hotelName",hotelName);
        executeRequest();
    }

    @Override
    public Class<OrderSubmitResponse> getResponseClass() {
        return OrderSubmitResponse.class;
    }
}
